feat: add isWarmingUp to status response#5047
Conversation
istae
left a comment
There was a problem hiding this comment.
@acha-bill the issue is about exposing the warmup period of the node you are running in the /status API. We do not need to expose if ours peers are in warmup via the status protocol .
d50e119 to
6cbdbf5
Compare
pkg/node/node.go
Outdated
| apiService.Mount() | ||
| apiService.SetProbe(probe) | ||
|
|
||
| apiService.SetWarmupTime(time.Now().Add(o.WarmupTime)) |
There was a problem hiding this comment.
here 's the tricky thing, if the postage batches are syncing, then setting this up here becomes inaccurate as we have not run this line yet https://github.com/ethersphere/bee/pull/5047/files#diff-515b2d0691202c4ea5e578ec896258ae9c440c381b608ed1eb7116a27847057dR782
maybe it would help if instead of passing a time to the api pkg, it can be done by toggling a bool externally?
There was a problem hiding this comment.
I see. Then we can just move it downwards after the sync.
Like where we initialize salud. https://github.com/ethersphere/bee/pull/5047/files#diff-515b2d0691202c4ea5e578ec896258ae9c440c381b608ed1eb7116a27847057dR920
There was a problem hiding this comment.
Now that I think of it again, the setter is better
There was a problem hiding this comment.
In the next PR we'll improve how we detect and set the warmup
istae
left a comment
There was a problem hiding this comment.
very nice, much cleaner this time around
Checklist
Description
Add
isWarmingUpto/statusresponse.Open API Spec Version Changes (if applicable)
Motivation and Context (Optional)
Related Issue (Optional)
Screenshots (if appropriate):